{% extends "memebase/base.html" %}
{% block extrahead %}
<script src="/static/js/jquery.js" type="text/javascript"> </script>
<script src="/static/js/edit_meme.js" type="text/javascript"> </script>
<script type="text/javascript">
    $(function() {
        meme.init({{conf_js|safe}});
     });
</script>
{% endblock extrahead %}
{% block content %}
{% load recurse %}
    <p id="status_message" class="status_message_block"></p>
    <ul>
        <li><a href="{{meme.get_absolute_url}}">Meme "{{meme.title}}"</a></li>
        <li>Created on {{meme.created}}</li>
        <li>By {{meme.author}}</li>
    </ul>
        <form id="form" action="{% url save_meme sitename=sitename,memename=memename %}" method="post">
        <div id="meme_content">
        <input type="submit" value="Save" />       
        {% recurse node.children with meme.nodes as node %}
            {% loop %}
            <div id="{{conf.div_prefix}}{{node.name}}" class="node">
                <span class="spinner">&nbsp;</span> <br />
                <span class="full_position">{{node.full_position}}</span>
                <textarea id="{{conf.textarea_prefix}}{{node.name}}" name="{{conf.textarea_prefix}}{{node.name}}" rows="10" class="node_content">{{node.content}}</textarea>
                <span class="subnode">{% child %}</span>
            </div>
            {% endloop %}
        {% endrecurse %}
        </div>
        <input type="submit" value="Save" />
        </form>
    <ul>
        <li>Tags: {{meme.tags}}</li>
    </ul>

{% endblock content %}
